package sky.treasure.properties;

import sky.treasure.Cell;
import sky.treasure.Coordinates;
import sky.treasure.results.IResult;
import sky.treasure.results.Result;
import sky.treasure.results.TreasureFound;

import java.util.HashSet;

/**
 * Created with IntelliJ IDEA.
 * User: Gauss
 * Date: 10.01.14
 * Time: 20:54
 * To change this template use File | Settings | File Templates.
 */
public class TreasureProperty extends AreaProperty {

    public TreasureProperty() {
    }

    public TreasureProperty(HashSet<Coordinates> coordinates) {
        super(coordinates);
    }

    @Override
    public IResult analyzeCell(Cell cell) {
        //do nothing
        return new Result();
    }

    @Override
    public IResult interactWithCell(Cell cell) {
        return new TreasureFound(cell.getCoordinates());
    }
}
